* lisp.h (CHAR_ALT, CHAR_SUPER, CHAR_HYPER): New constants, in
authorJim Blandy <jimb@redhat.com>
Tue, 4 May 1993 02:34:26 +0000 (02:34 +0000)
committerJim Blandy <jimb@redhat.com>
Tue, 4 May 1993 02:34:26 +0000 (02:34 +0000)
case we need them.
* termhooks.h (alt_modifier, super_modifier, hyper_modifier,
shift_modifier, ctrl_modifier, meta_modifier): Define these in
terms of the CHAR_mumble macros, to avoid having the same thing
defined in two places.

Arrange for Fy_or_n_p to put off switch-frame events.
* lread.c (read_filtered_char): New function, which contains the
code which used to be in Fread_char, Fread_event, and
Fread_char_exclusive; there was a lot of common code.
(Fread_char, Fread_event, Fread_char_exclusive): Rewrite in terms
of read_filtered_char.
* lisp.h (read_filtered_char): Declare this extern here.
* fns.c (Fy_or_n_p): Call read_filtered_char, arranging to delay
switch-frame events.

Make the modifier manipulation functions more robust.  The old way
caused a bug once, and probably would again.
* termhooks.h (alt_modifier, super_modifier, hyper_modifier,
shift_modifier, ctrl_modifier, meta_modifier): Shift these all
down one bit in value, to avoid sign extension problems.
* lisp.h (CHAR_META, CHAR_CTL, CHAR_SHIFT): Fix these definitions too.
* keyboard.c (lispy_modifier_list): Ignore modifier bits beyond
what our table of modifier names can handle.
(apply_modifiers): Don't abort if you see extra modifier bits,
just remove them.

* lisp.h (Qrange_error, Qdomain_error, Qsingularity_error,
Qoverflow_error, Qunderflow_error): Add extern to these declarations.

src/lisp.h

index 57a6a2f5092fdfcb972d9d69c1d9d6fb72583a33..7f08159a1454cc166d5131989db8c828b8067e37 100644 (file)
@@ -569,11 +569,13 @@ typedef unsigned char UCHAR;
 #define COMPILED_DOC_STRING 4
 #define COMPILED_INTERACTIVE 5
 
-/* Flag bits in a character.  */
-
-#define CHAR_META 0x800000
-#define CHAR_CTL  0x400000
-#define CHAR_SHIFT 0x200000
+/* Flag bits in a character.  These also get used in termhooks.h.  */
+#define CHAR_ALT   (0x020000)
+#define CHAR_SUPER (0x040000)
+#define CHAR_HYPER (0x080000)
+#define CHAR_SHIFT (0x100000)
+#define CHAR_CTL   (0x200000)
+#define CHAR_META  (0x400000)
 \f
 /* Data type checking */
 
@@ -936,8 +938,8 @@ extern Lisp_Object Qinvalid_function, Qwrong_number_of_arguments, Qno_catch;
 extern Lisp_Object Qend_of_file, Qarith_error;
 extern Lisp_Object Qbeginning_of_buffer, Qend_of_buffer, Qbuffer_read_only;
 
-Lisp_Object Qrange_error, Qdomain_error, Qsingularity_error;
-Lisp_Object Qoverflow_error, Qunderflow_error;
+extern Lisp_Object Qrange_error, Qdomain_error, Qsingularity_error;
+extern Lisp_Object Qoverflow_error, Qunderflow_error;
 
 extern Lisp_Object Qintegerp, Qnumberp, Qnatnump, Qsymbolp, Qlistp, Qconsp;
 extern Lisp_Object Qstringp, Qarrayp, Qsequencep, Qbufferp;
@@ -1041,6 +1043,7 @@ extern Lisp_Object Vobarray, Vstandard_input;
 extern Lisp_Object Fread (), Fread_from_string ();
 extern Lisp_Object Fintern (), Fintern_soft (), Fload ();
 extern Lisp_Object Fget_file_char (), Fread_char ();
+extern Lisp_Object read_filtered_event ();
 extern Lisp_Object Feval_current_buffer (), Feval_region ();
 extern Lisp_Object intern (), oblookup ();
 #define LOADHIST_ATTACH(x) \